import yagmail,yaml,logging

def send():
    r=yagmail.SMTP(user='1418953961@qq.com',password='flmhycefgeagbadj',host='smtp.qq.com')
    r.send(to='1418953961@qq.com',subject='测试报告',contents='作业',attachments=['D:\桌面\guoqing1\测试报告.html',r'D:\桌面\guoqing1\allure-report\index.html'])
def yaml_data(dizhi):
    with open(dizhi,encoding='utf8') as f:
        return yaml.safe_load(f)
def log():
        log=logging.basicConfig(
                                force=True,
                                format='%(filename)s %(levelname)s %(message)s %(lineno)d',
                                level=logging.DEBUG,
                                filemode='a+',
                                filename='aa.log',
                                encoding='utf-8'
        )

